package com.heima.article.controller;


import com.heima.article.service.IApArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 文章信息表，存储已发布的文章 前端控制器
 * </p>
 *
 * @author lin
 * @since 2025-06-10
 */
@RestController
@RequestMapping("/api/v1/article")
public class ApArticleController {
    @Autowired
    private IApArticleService apArticleService;

    /**
     * 上传文章图片
     */
    @GetMapping("/upload/{articleId}")
    public void load(@PathVariable("articleId") Integer articleId) {
        apArticleService.upload(articleId);
    }
}
